Eclipse Platform
Pre-release 3.0

org.eclipse.team.ui.synchronize
Interface ISynchronizeParticipant

All Superinterfaces:
IExecutableExtension
All Known Implementing Classes:
AbstractSynchronizeParticipant

public interface ISynchronizeParticipant
extends IExecutableExtension

A synchronize participant provides a logical connection between local resources and a remote location that is used to share those resources. The Synchronize View displays synchronize participants.

A participant must create a page that will be displayed in the ISynchronizeView page book view. Clients may implement this interface.

Since:
3.0
See Also:
ISynchronizeView, ISynchronizeManager

Method Summary
 void addPropertyChangeListener(IPropertyChangeListener listener)
          Adds a listener for changes to properties of this synchronize participant.
 IPageBookViewPage createPage(ISynchronizeView view)
          Creates and returns a new page for this synchronize participant.
 void dispose()
          Disposes of this synchronize participant.
 String getId()
          Returns the unique id that identified the type of this synchronize participant.
 ImageDescriptor getImageDescriptor()
          Returns an image descriptor for this synchronize participant, or null if none.
 String getName()
          Returns the name of this synchronize participant.
 void init(IMemento memento)
          Initializes this participant with the given participant state.
 void removePropertyChangeListener(IPropertyChangeListener listener)
          Removes the given property listener from this synchronize participant.
 void saveState(IMemento memento)
          Saves the participants object state within the memento.
 
Methods inherited from interface org.eclipse.core.runtime.IExecutableExtension
setInitializationData
 

Method Detail

getId

public String getId()
Returns the unique id that identified the type of this synchronize participant. The synchronize manager supports registering several instances of the same participant type.

Returns:
the unique id that identified the type of this synchronize participant.

getName

public String getName()
Returns the name of this synchronize participant.

Returns:
the name of this synchronize participant

getImageDescriptor

public ImageDescriptor getImageDescriptor()
Returns an image descriptor for this synchronize participant, or null if none.

Returns:
an image descriptor for this synchronize participant, or null if none

createPage

public IPageBookViewPage createPage(ISynchronizeView view)
Creates and returns a new page for this synchronize participant. The page is displayed for this synchronize participant in the given synchronize view.

Parameters:
view - the view in which the page is to be created
Returns:
a page book view page representation of this synchronize participant

init

public void init(IMemento memento)
          throws PartInitException
Initializes this participant with the given participant state. A memento is passed to the participant which contains a snapshot of the participants state from a previous session.

This method is automatically called by the team plugin shortly after participant construction. It marks the start of the views's lifecycle. Clients must not call this method.

Parameters:
memento - the participant state or null if there is no previous saved state
Throws:
PartInitException - if this participant was not initialized successfully

dispose

public void dispose()
Disposes of this synchronize participant. This is the last method called on the ISynchronizeParticipant. It marks the end of the participants lifecycle.

Within this method a participant may release any resources, fonts, images, etc. held by this part. It is also very important to deregister all listeners.

Clients should not call this method (the synchronize manager calls this method at appropriate times).


saveState

public void saveState(IMemento memento)
Saves the participants object state within the memento. This state will be available when the participant is restored via init.

Parameters:
memento - a memento to receive the object state

addPropertyChangeListener

public void addPropertyChangeListener(IPropertyChangeListener listener)
Adds a listener for changes to properties of this synchronize participant. Has no effect if an identical listener is already registered.

The changes supported by the synchronize view are as follows:

Clients may define additional properties as required.

Parameters:
listener - a property change listener

removePropertyChangeListener

public void removePropertyChangeListener(IPropertyChangeListener listener)
Removes the given property listener from this synchronize participant. Has no effect if an identical listener is not alread registered.

Parameters:
listener - a property listener

Eclipse Platform
Pre-release 3.0

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.